home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
ablood1a
/
form1.frm
next >
Wrap
Text File
|
1998-10-11
|
4KB
|
166 lines
VERSION 5.00
Begin VB.Form Form1
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 4440
ClientLeft = 0
ClientTop = 0
ClientWidth = 6525
DrawWidth = 15
LinkTopic = "Form1"
ScaleHeight = 4440
ScaleWidth = 6525
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
WindowState = 2 'Maximized
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Blood Shot Screen Saver v1.0
'Author: Dustin Davis
'Bootleg Software Inc.
'http://www.warpnet.org/bsi
'
'This program and its code was ALL, and I mean EVERY LINE was written from
'scratch by me. If someone else has done something like this, I have not seen it
'and that is why i made this one! It is not set up to be in screen saver
'format yet, but all it takes is a few adjustments. Feel free to edit it
'to your taste. Yes, I know its kind of cheesy, but hey, i was bored!
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim bSize As Long
Dim Counter As Integer
Dim sound As Boolean
Dim X As Long
Dim Y As Long
Dim Go As Boolean
Private Sub Form_Activate()
'starts the show!
Call Blood_Stream
End Sub
Private Sub Form_Click()
Go = False 'exits
End Sub
Public Sub Blood_Stream()
'draws the blood stream
Dim i As Long
Dim j As Long
Randomize
i = 3
j = 3
Go = True
X = 0
Y = 0
Do
Randomize
check_border 'check to see if a new shot should be fired!
DoEvents
i = (Rnd * 3)
If i = 1 Then
Y = (Y - (i * 4))
PSet (X, Y), RGB(250, 0, 0)
ElseIf i = 2 Then
Y = (Y + (i * 4))
PSet (X, Y), RGB(250, 0, 0)
Else
PSet (X, Y), RGB(240, 4, 4) 'this gives it a more realistic look
End If
Randomize
DoEvents
j = (Rnd * 3)
If j = 1 Then
X = (X + (i * 4))
PSet (X, Y), RGB(250, 0, 0)
ElseIf j = 2 Then
X = (X - (i * 4))
PSet (X, Y), RGB(250, 0, 0)
Else
PSet (X, Y), RGB(240, 4, 4) 'this gives it a more realistic look
End If
Randomize
Loop Until Go = False
Unload Me
End Sub
Public Sub check_border()
'this is important. If the blood stream has reached the bootom of the screen, then
'shot the screen again!
Dim clear As Integer
clear = GetSetting("blood", "settings", "clear", "10")
If X <= 0 Then
X = (Rnd * Form1.Width)
Y = (Rnd * Form1.Height)
If Counter = clear Then
Form1.Cls
Counter = 0
Else
Counter = Counter + 1
End If
If sound = True Then
playwav "gun.wav"
End If
ElseIf X >= Form1.Width Then
X = (Rnd * Form1.Width)
Y = (Rnd * Form1.Height)
If Counter = clear Then
Form1.Cls
Counter = 0
Else
Counter = Counter + 1
End If
If sound = True Then
playwav "gun.wav"
End If
ElseIf Y <= 0 Then
X = (Rnd * Form1.Width)
Y = (Rnd * Form1.Height)
If Counter = clear Then
Form1.Cls
Counter = 0
Else
Counter = Counter + 1
End If
If sound = True Then
playwav "gun.wav"
End If
ElseIf Y >= Form1.Height Then
X = (Rnd * Form1.Width)
Y = (Rnd * Form1.Height)
If Counter = clear Then
Form1.Cls
Counter = 0
Else
Counter = Counter + 1
End If
If sound = True Then
playwav "gun.wav"
End If
End If
End Sub
Private Sub Form_DblClick()
Form2.Visible = True 'show settings
End Sub
Private Sub Form_Load()
'load all the settings
sound = GetSetting("blood", "settings", "sound", "true")
size = GetSetting("blood", "settings", "size", "20")
Form1.DrawWidth = size 'sets the size of the blood stream
Counter = 0
End Sub